<template>
	<view class="ai-read">
		<NavBarVue title="测试结果"></NavBarVue>
		<view class="ai-read-content">
			<text class="title">{{params.name}}</text>
			<view class="analysis">{{quickanswer}}</view>
		</view>
		<view class="ai-read-btn">其他测试</view>
	</view>
</template>

<script setup>
import { ref } from 'vue';
import testApi from '@/apis/apiList/testApi'
import { onLoad } from '@dcloudio/uni-app'

const quickanswer = ref('')
const params = ref({})

// 解读
onLoad((e) => {
	params.value = JSON.parse(e.params)
	testApi.membergetQuickAnsque(params.value).then(res => {
		quickanswer.value = res.data.addmsg
	})
})
</script>

<style lang="scss" scoped>
	.ai-read {
		height: 100vh;
		padding-top: 20rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		position: relative;
		.ai-read-content {
			width: 720rpx;
			max-height: 50vh;
			background: url(/static/test/man_box_bg.png) no-repeat center center;
			background-size: 100% 100%;
			padding: 20vh 30rpx 0;
			box-sizing: border-box;
			.title {
				font-size: 30rpx;
				font-weight: bold;
				color: #444;
			}
			.analysis {
				margin-top: 10%;
				width: 100%;
				height: 60%;
				background: #EBF5FB;
				padding: 20rpx;
				box-sizing: border-box;
				font-szie: 24rpx;
				color: #333;
				font-size: 18px;
				overflow-y: auto;
			}
		}
		.ai-read-btn {
			position: fixed;
			bottom: 42rpx;
			left: 20rpx;
			width: 710rpx;
			height: 120rpx;
			border-radius: 60rpx;
			background: #329EFF;
			font-size: 30rpx;
			color: #fff;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
</style>